package com.ssy.lingxi.message.api.feign;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.message.api.vo.request.WsMessageRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 *  内部接口-webSocket消息
 * @author yzc
 * @version 2.0.0
 * @date 2021/5/26
 */
@FeignClient(name = "message-service")
public interface WsMessageControllerFeign {

    /**
     * 发送websocket消息
     * @param request
     * @return
     */
    @PostMapping("/message/wsMsg/feign/send")
    Wrapper sendWsMessage(@RequestBody WsMessageRequest request);

    /**
     * 发送websocket消息(批量)
     * @param request
     * @return
     */
    @PostMapping("/message/wsMsg/feign/batchSend")
    Wrapper batchSendWsMessage(@RequestBody List<WsMessageRequest> request);
}
